<template>
	<div class="housearch">
		<div style="height: 20px;background: #1E82D2 ;"></div>
		<!--<mt-header title="筛选"  style='background: #1E82D2;font-size: 1.125rem;height: 3rem;' >
		  <router-link to="/house" slot="left">
		     <i class="material-icons left_1" style="color: #fff;">chevron_left</i>
		  </router-link>
		</mt-header>-->
		<x-header  class='head' :left-options="{backText: ''}">筛选</x-header>
		<div class="choice">
			<div class="choice-c">
			<span>仓库类型</span>
        <select class="choice-k" @change="housetype">
		  <option value ="请选择设备类型">请选择仓库类型</option>
		  <option v-for="item in list" :key="item">{{item.label}}</option>
		</select>
		</div>
        </div>
        
        <div class="choice">
			<div class="choice-c">
			<span>所属机构</span>
			<router-link :to="{path:'/houper'}" style='color: #000;'>
		        <select class="choice-k">
				  <option value ="请选择主机型号">请选择所属机构</option>
				  <option value ="塔式起重机">塔式起重机</option>
				</select>
			</router-link>
			</div>
	        </div>
		
	</div>
</template>

<script>
import { XHeader } from 'vux'
import { warehousetype } from '@/service/getdata'
export default {
  components: {
    XHeader
  },
  data() {
    return {
      token: localStorage.token,
      list: []
    }
  },
  mounted() {
    warehousetype(this.token).then(res => {
      console.log(res)
      this.list = res.results
    })
  },
  methods: {
    housetype(e) {
      console.log(e.target.value)
    }
  }
}
</script>

<style scoped>
.choice {
  width: 100%;
  height: 3rem;
  background: #fff;
}
.choice-c {
  padding: 0.5rem;
}
.choice span {
  line-height: 2rem;
  font-size: 0.8rem;
}
.choice-k option {
  font-size: 0.8rem !important;
}
.choice-k {
  width: 60%;
  float: right;
  line-height: 2rem;
  height: 2rem;
  border: none;
  color: #606063;
  font-size: 0.8rem !important;
}
.head {
  width: 100%;
  background: #1e82d2;
  font-size: 1.125rem;
  height: 3rem;
}
</style>